<form action="" class="top30 dingJia PingGu5W">
    <table class="tableNew tableRaius dingJia" for="" border="0" cellspacing="0" cellpadding="0" style="border-collapse:separate;border-spacing: 0;">
        <tr>
            <td>银行评估价值（总价/元）</td>
            <td>
                <input style="padding-left: 0;" type="text"  readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['bank_value'])?$EvaluationTable['bank_value']:''?>" />
            </td>
            <td>第三方评估价（总价/元）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['third_partner_value'])?$EvaluationTable['third_partner_value']:''?>" />
            </td>
        </tr>
        <tr>
            <td>第三方评估价（清算价值/元）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['third_partner_value_other'])?$EvaluationTable['third_partner_value_other']:''?>" />
            </td>
            <td>司法拍卖单价（元/㎡）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['auction_price'])?$EvaluationTable['auction_price']:''?>" />
            </td>
        </tr>
        <tr>
            <td>市场保守单价（元/㎡）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['market_conserve_price'])?$EvaluationTable['market_conserve_price']:''?>" />
            </td>
            <td>市场保守总价（元）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['market_conservation_total_price'])?$EvaluationTable['market_conservation_total_price']:''?>" />
            </td>
        </tr>

        <tr>
            <td>市场激进单价（元/㎡）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['market_radical_price'])?$EvaluationTable['market_radical_price']:''?>" />
            </td>
            <td>市场激进总价（元）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['market_radical_total_price'])?$EvaluationTable['market_radical_total_price']:''?>" />
            </td>
        </tr>
        <tr>
            <td>抵押物变现价保守（元）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['payment_reservation'])?$EvaluationTable['payment_reservation']:''?>" />
            </td>
            <td>抵押物变现价激进（元）</td>
            <td>
                <input style="padding-left: 0;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['payment_radical'])?$EvaluationTable['payment_radical']:''?>" />
            </td>
        </tr>
        <tr>
            <td>抵押物定价依据</td>
            <td colspan="3">
            	<pre><?= !empty($EvaluationTable['price_reason'])?$EvaluationTable['price_reason']:''?></pre>
               <!-- <input style="padding-left: 0;color: #333333;" type="text" readonly="readonly" name="" id="" title="内容提示" value="<?= !empty($EvaluationTable['price_reason'])?$EvaluationTable['price_reason']:''?>" />-->
            </td>

        </tr>
    </table>
</form>
<form action="" id="dingJiaPingGuEdit" class="top30 PingGu5Edit borderColor" style="display: none;">
    <input type="text" hidden value="<?= !empty($ppseid)?$ppseid:0;?>" id="ppseid5">
    <table class="tableNew ditTable tableEdit8" for="" border="0" cellspacing="0" cellpadding="0" style="border-collapse:separate;border-spacing: 0;border: none;">
        <tr>
            <td>银行评估价值（总价/元）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['bank_value'])?$EvaluationTable['bank_value']:''?>" id="bank_value"/>
            </td>
            <td>第三方评估价（总价/元）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['third_partner_value'])?$EvaluationTable['third_partner_value']:''?>" id="third_partner_value" />
            </td>
        </tr>
        <tr>
            <td>第三方评估价（清算价值/元）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['third_partner_value_other'])?$EvaluationTable['third_partner_value_other']:''?>" id="third_partner_value_other" />
            </td>
            <td>司法拍卖单价（元/㎡）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['auction_price'])?$EvaluationTable['auction_price']:''?>" id="auction_price" />
            </td>
        </tr>
        <tr>
            <td>市场保守单价（元/㎡）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['market_conserve_price'])?$EvaluationTable['market_conserve_price']:''?>" id="market_conserve_price" />
            </td>
            <td>市场保守总价（元）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['market_conservation_total_price'])?$EvaluationTable['market_conservation_total_price']:''?>" id="market_conservation_total_price" />
            </td>
        </tr>

        <tr>
            <td>市场激进单价（元/㎡）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['market_radical_price'])?$EvaluationTable['market_radical_price']:''?>" id="market_radical_price" />
            </td>
            <td>市场激进总价（元）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['market_radical_total_price'])?$EvaluationTable['market_radical_total_price']:''?>" id="market_radical_total_price" />
            </td>
        </tr>
        <tr>
            <td>抵押物变现价保守（元）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['payment_reservation'])?$EvaluationTable['payment_reservation']:''?>" id="payment_reservation" />
            </td>
            <td>抵押物变现价激进（元）</td>
            <td>
                <input type="text" isNumber='true' onkeydown="true" value="<?= !empty($EvaluationTable['payment_radical'])?$EvaluationTable['payment_radical']:''?>" id="payment_radical" />
            </td>
        </tr>
        <tr>
            <td>抵押物定价依据</td>
            <td colspan="3">
                <textarea name="" rows="" cols="" class="textarea-edit"  id="price_reason"><?= !empty($EvaluationTable['price_reason'])?$EvaluationTable['price_reason']:''?></textarea>
            </td>

        </tr>
    </table>
    <div class="cancelInConfirm clearfix">
        <input id="ajaxMortgagePinggu" class="cancelInConfirmActive" type="button" value="保存" />
        <input id='cancelPingGu' type="button" value="取消" />
    </div>
</form>
<!-- textarea 高度设置对比div -->
	
<div style="max-height: 1px; overflow: hidden;">
	
	<div id="d1" style="visibility:hidden;min-height: 80px;"></div>

</div>
<script>
    $(function () {
    	
    	
    	 //高亮显示开始
         $(document).on("focus",'textarea',function(){
				$(this).css({
							'border':'1px solid #2194f1'
				})
			})
		$(document).on("blur",'textarea',function(){
			$(this).css({
						'border':'1px solid #e2e2e2'
			})
		})
		
		 $(".borderColor").on("focus",'input',function(){
				$(this).css({
							'border':'1px solid #2194f1'
				})
			})
		$(".borderColor").on("blur",'input',function(){
			$(this).css({
						'border':'1px solid #e2e2e2'
			})
		})
		 $(".borderColor").on("focus",'select',function(){
				$(this).css({
							'border':'1px solid #2194f1'
				})
			})
		$(".borderColor").on("blur",'select',function(){
			$(this).css({
						'border':'1px solid #e2e2e2'
			})
		})
    	//高亮显示结束
    	
    		// textarea 高度展示问题
	    $(".textarea-edit").keyup(function(){
//	           console.log(111111111);
	      var val = $(this).val();
	      $("#d1").html("<pre>" +val+" "+"</pre>");
	      var h = $("#d1").height() ;
	      $(this).height(h);
	    });
	    
	    
        var mortgage_id = $("#mortgage_id").val();
        $("#ajaxMortgagePinggu").click(function () {
            var bank_value = $("#bank_value").val();
            var third_partner_value = $("#third_partner_value").val();
            var third_partner_value_other = $("#third_partner_value_other").val();
            var auction_price = $("#auction_price").val();
            var market_conserve_price = $("#market_conserve_price").val();
            var market_radical_price = $("#market_radical_price").val();
            var market_conservation_total_price = $("#market_conservation_total_price").val();
            var market_radical_total_price = $("#market_radical_total_price").val();
            var payment_reservation = $("#payment_reservation").val();
            var payment_radical = $("#payment_radical").val();
            var price_reason = $("#price_reason").val();
            var ppseid5 = $("#ppseid5").val();
            var url = '/project/ajax-save-evaluation-value-table-project';
            var Pdtat = {
                'bank_value':bank_value,
                'third_partner_value':third_partner_value,
                'third_partner_value_other':third_partner_value_other,
                'auction_price':auction_price,
                'market_conserve_price':market_conserve_price,
                'market_radical_price':market_radical_price,
                'market_conservation_total_price':market_conservation_total_price,
                'market_radical_total_price':market_radical_total_price,
                'payment_reservation':payment_reservation,
                'payment_radical':payment_radical,
                'price_reason':price_reason,
                'ppseid':ppseid5,
            };
            $.post(url,{data:Pdtat,mortgage_id:mortgage_id},function (res) {
                if(res){
                    layer.msg('保存成功')
                    seal2W();
                }else{
                    layer.msg('保存失败')
                }
            })
        })
        //-----------------渲染无编辑页面--------------------
        function seal2W() {
            var ppseid5 = $("#ppseid5").val();
            $.get('/project/get-mortgage-view-table',{'project_id':project_id,'postion':5,'mortgage_id':mortgage_id,"ppseid":ppseid5},function (res) {
                $(".PingGu5Edit").remove();
                $(".PingGu5W").remove();
                $("#pinggu5").before(res);
                $("#getPingGu5").show();
            })
        }
        //-----取消保存按钮
        $("#cancelPingGu").click(function () {
            var ppseid5 = $("#ppseid5").val();
            $.post('/project/ajax-un-lock',{'postion':115,'ppesid':ppseid5,},function (res) {
                var JSONData = JSON.parse(res)
                if (JSONData.code == 200){
                    layer.msg(JSONData.message);
                }else{
                    layer.msg(JSONData.message);
                }
            });
            $(".PingGu5Edit").hide();
            $(".PingGu5W").show();
        })
    })
    
    
    //前端验证开始
//	$.validator.setDefaults({
//	   debug: true
//	})
//	
//	$("#dingJiaPingGuEdit").validate({});
    //前端验证结束 
    
</script>